From c0df8da964e7589a5c8eb31517d3fbb01c4b5df9 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 9 Jun 2013 08:59:30 -0700 Subject: [PATCH] Merge from gnulib. This incorporates: 2013-06-02 sig2str: port to C++ 2013-05-29 c-ctype, regex, verify: port to gcc -std=c90 -pedantic --- ChangeLog | 6 ++++++ lib/c-ctype.h | 3 ++- lib/sig2str.h | 8 ++++++++ lib/verify.h | 4 +++- 4 files changed, 19 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1ae0abe056e..fa066c86c27 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2013-06-09 Paul Eggert + + Merge from gnulib, incorporating: + 2013-06-02 sig2str: port to C++ + 2013-05-29 c-ctype, regex, verify: port to gcc -std=c90 -pedantic + 2013-06-08 Jan Djärv * configure.ac (HAVE_GLIB): Only set XGSELOBJ if HAVE_NS = no. diff --git a/lib/c-ctype.h b/lib/c-ctype.h index 3a66440ae9e..ad589b5c209 100644 --- a/lib/c-ctype.h +++ b/lib/c-ctype.h @@ -136,7 +136,8 @@ extern int c_tolower (int c) _GL_ATTRIBUTE_CONST; extern int c_toupper (int c) _GL_ATTRIBUTE_CONST; -#if defined __GNUC__ && defined __OPTIMIZE__ && !defined __OPTIMIZE_SIZE__ && !defined NO_C_CTYPE_MACROS +#if (defined __GNUC__ && !defined __STRICT_ANSI__ && defined __OPTIMIZE__ \ + && !defined __OPTIMIZE_SIZE__ && !defined NO_C_CTYPE_MACROS) /* ASCII optimizations. */ diff --git a/lib/sig2str.h b/lib/sig2str.h index d16be98c076..df6bfd39e3d 100644 --- a/lib/sig2str.h +++ b/lib/sig2str.h @@ -27,9 +27,17 @@ /* Size of a buffer needed to hold a signal name like "HUP". */ # define SIG2STR_MAX (sizeof "SIGRTMAX" + INT_STRLEN_BOUND (int) - 1) +#ifdef __cplusplus +extern "C" { +#endif + int sig2str (int, char *); int str2sig (char const *, int *); +#ifdef __cplusplus +} +#endif + #endif /* An upper bound on signal numbers allowed by the system. */ diff --git a/lib/verify.h b/lib/verify.h index cb8e90b5427..03492efcd3f 100644 --- a/lib/verify.h +++ b/lib/verify.h @@ -31,7 +31,9 @@ Use this only with GCC. If we were willing to slow 'configure' down we could also use it with other compilers, but since this affects only the quality of diagnostics, why bother? */ -# if (4 < __GNUC__ || (__GNUC__ == 4 && 6 <= __GNUC_MINOR__)) && !defined __cplusplus +# if (4 < __GNUC__ + (6 <= __GNUC_MINOR__) \ + && (201112L <= __STDC_VERSION__ || !defined __STRICT_ANSI__) \ + && !defined __cplusplus) # define _GL_HAVE__STATIC_ASSERT 1 # endif /* The condition (99 < __GNUC__) is temporary, until we know about the -- 2.30.2